// This is the main DLL file.
#include "wx/wx.h"
#include "wx/app.h"

#include <wx/string.h>
#include <wx/frame.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/grid.h>
#include <wx/sizer.h>
#include <wx/plotctrl/plotctrl.h>
#ifdef __VISUALC__
#include <wx/link_additions.h>
#endif //__VISUALC__
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/gauge.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/dialog.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/button.h>
#include <wx/radiobox.h>

 #include <process.h> 
#include "AlgoExp.h"
#include "MATSSVEP_CSP.h"

Algorithm* __cdecl GetNewAlgorithm(void)
{
	return new MatSSVEP_CSP;
}
void __cdecl ReleaseAlgorithm(Algorithm* pSum)
{
	delete pSum;
}



IMPLEMENT_APP_NO_MAIN(wxDLLApp)

BOOL APIENTRY DllMain( HANDLE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                                         )
{
        switch (ul_reason_for_call)
        {
                case DLL_PROCESS_ATTACH:
                {       //use wxInitialize() if you don't want GUI instead of the following 12 lines
                        wxSetInstance((HINSTANCE)hModule);
                        int argc = 0;
                        char **argv = NULL;
                        wxEntryStart(argc, argv);
                        if ( !wxTheApp || !wxTheApp->CallOnInit() )
                                return FALSE;
                }
                break;

                case DLL_THREAD_ATTACH:
                break;

                case DLL_THREAD_DETACH:
                break;

                case DLL_PROCESS_DETACH:
                 wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
                break;
        }
    return TRUE;
}


bool wxDLLApp::OnInit()
{
//	::wxInitialize();6
	return true;
}
/*
int wxDLLApp::OnExit()
{
//	::wxUninitialize();
	//return wxDLLApp::OnExit();
}*/